/*     */ package com.lmpop.trade.ti_re_quote;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ 
/*     */ public class Ti_re_quoteInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_re_quoteInfo()
/*     */   {
/*  15 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  24 */     Ti_re_quote ti_re_quote = new Ti_re_quote();
/*  25 */     ti_re_quote.setRe_trade_id(map.getString("re_trade_id"));
/*  26 */     ti_re_quote.setTrade_id(map.getString("trade_id"));
/*  27 */     ti_re_quote.setTitle(map.getString("title"));
/*  28 */     ti_re_quote.setContent(map.getString("content"));
/*  29 */     ti_re_quote.setRsrv_st1(map.getString("rsrv_st1"));
/*  30 */     ti_re_quote.setRsrv_str2(map.getString("rsrv_str2"));
/*  31 */     ti_re_quote.setRsrv_str3(map.getString("rsrv_str3"));
/*  32 */     ti_re_quote.setCust_id(map.getString("cust_id"));
/*  33 */     ti_re_quote.setIn_date(map.getString("in_date"));
/*  34 */     ti_re_quote.setUser_id(map.getString("user_id"));
/*  35 */     ti_re_quote.setRemark(map.getString("remark"));
/*     */ 
/*  37 */     String result_code = "0";
/*     */     try {
/*  39 */       insert(dbmMgr, ti_re_quote);
/*     */     } catch (ApplicationException e) {
/*  41 */       e.printStackTrace();
/*  42 */       result_code = "1";
/*     */     }
/*  44 */     map.setString("result_code", result_code);
/*  45 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_re_quote ti_re_quote)
/*     */     throws ApplicationException
/*     */   {
/*  54 */     dbmMgr.update("insertTi_re_quote", ti_re_quote);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  64 */     String pkid_string = map.getString("pkid");
/*  65 */     String result_code = "0";
/*     */     try {
/*  67 */       if (!pkid_string.equals("")) {
/*  68 */         String[] pkStr = pkid_string.split("\\|");
/*  69 */         for (int i = 0; i < pkStr.length; i++) {
/*  70 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  74 */       e.printStackTrace();
/*  75 */       result_code = "1";
/*     */     }
/*  77 */     map.setString("result_code", result_code);
/*  78 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  87 */     dbmMgr.update("deleteTi_re_quote", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  96 */     Ti_re_quote ti_re_quote = new Ti_re_quote();
/*  97 */     ti_re_quote.setRe_trade_id(map.getString("re_trade_id"));
/*  98 */     ti_re_quote.setTrade_id(map.getString("trade_id"));
/*  99 */     ti_re_quote.setTitle(map.getString("title"));
/* 100 */     ti_re_quote.setContent(map.getString("content"));
/* 101 */     ti_re_quote.setRsrv_st1(map.getString("rsrv_st1"));
/* 102 */     ti_re_quote.setRsrv_str2(map.getString("rsrv_str2"));
/* 103 */     ti_re_quote.setRsrv_str3(map.getString("rsrv_str3"));
/* 104 */     ti_re_quote.setCust_id(map.getString("cust_id"));
/* 105 */     ti_re_quote.setIn_date(map.getString("in_date"));
/* 106 */     ti_re_quote.setUser_id(map.getString("user_id"));
/* 107 */     ti_re_quote.setRemark(map.getString("remark"));
/*     */ 
/* 109 */     String result_code = "0";
/*     */     try {
/* 111 */       update(dbmMgr, ti_re_quote);
/*     */     } catch (ApplicationException e) {
/* 113 */       e.printStackTrace();
/* 114 */       result_code = "1";
/*     */     }
/* 116 */     map.setString("result_code", result_code);
/* 117 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_re_quote ti_re_quote)
/*     */     throws ApplicationException
/*     */   {
/* 126 */     dbmMgr.update("updateTi_re_quote", ti_re_quote);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 136 */     Hashtable ti_re_quote = (Hashtable)obj;
/* 137 */     if (start == 0)
/* 138 */       start = 0;
/*     */     else {
/* 140 */       start = (start - 1) * limit;
/*     */     }
/* 142 */     ti_re_quote.put("start", Integer.valueOf(start));
/* 143 */     ti_re_quote.put("limit", Integer.valueOf(limit));
/* 144 */     return this.queryList.getList("getListByTi_re_quotePage", ti_re_quote);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 155 */     Hashtable ti_re_quote = (Hashtable)obj;
/* 156 */     List list = this.queryList.getList("getCountByObjTi_re_quote", ti_re_quote);
/* 157 */     int count = 0;
/* 158 */     if ((list != null) && (list.size() > 0)) {
/* 159 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 160 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 161 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 164 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 174 */     return this.queryList.getList("getTi_re_quoteByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_re_quote.Ti_re_quoteInfo
 * JD-Core Version:    0.6.0
 */